/*
 * trace_FuncStackInfo.h
 *
 *  Created on: 2012/08/06
 *      Author: guanxiaoying
 */

#ifndef TRACE_FUNCSTACKINFO_H_
#define TRACE_FUNCSTACKINFO_H_
/*
 * the stack of functions( for tracing )( stTrFunctionAccess ).
 * Used when going into called functions.
 * Push the value of stCmdCurrTraceInfo before entering callee.
 * Pop the value to stCmdCurrTraceInfo after exiting callee.
*/
typedef struct _FUNCSTACKINFOACCESS
{
	BOOL (*clear)( VOID );
	BOOL (*alloc)( AST );
	AST  (*getMax)( VOID );
//  members of stCmdCurrTraceInfo
	//	member of  stCmdCurrTraceInfo:UCHAR loopFlg
	ACCESS_U2_FIELD  loopFlg;
	//	member of  stCmdCurrTraceInfo:AST			astTable;
	ACCESS_IDX_FIELD cmdList;
	//	member of  stCmdCurrTraceInfo:AST			astNext;
	ACCESS_IDX_FIELD nextCmdList;
	//	member of  stCmdCurrTraceInfo:AST         astPath;
	ACCESS_IDX_FIELD path;
	//	member of  stCmdCurrTraceInfo:AST         astPathNext;
	ACCESS_IDX_FIELD nextPath;
	//	member of  stCmdCurrTraceInfo:AST         astPathParam;
	ACCESS_IDX_FIELD pathParam;
	//	member of  stCmdCurrTraceInfo:AST         astLoop;
	ACCESS_IDX_FIELD loop;
	//	member of  stCmdCurrTraceInfo:AST			astFunction;
	ACCESS_IDX_FIELD function;
	//	member of  stCmdCurrTraceInfo:AST         astPathStkBottom;
	ACCESS_IDX_FIELD pathStackBottom;
	//	member of  stCmdCurrTraceInfo:AST         astLoopExitBottom;
	ACCESS_IDX_FIELD loopExitBottom;
/*  For the tables:  the records added in current function */
	ACCESS_IDX_FIELD pathStackMax;
	ACCESS_IDX_FIELD loopStackMax;
/*  For the tables:  the records added in current function
	have to be cleared when leaving current function. Record the number of records
	before entering the function */
	ACCESS_IDX_FIELD pathParamMax;
} FUNCSTACKINFOACCESS;

extern const FUNCSTACKINFOACCESS  stFuncStkAccess;
#endif /* TRACE_FUNCSTACKINFO_H_ */
